package com.haochu.xxl.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import com.haochu.xxl.R;

public class MainActivity extends Activity implements OnClickListener {

    // 开始游戏按钮
    private Button mBtnStartGame;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // 设置无标题
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        // 设置全屏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.main);

        mBtnStartGame = findViewById(R.id.mBtnStartGame);
        mBtnStartGame.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.mBtnStartGame:
                startActivity(new Intent(MainActivity.this, GameSceneActivity.class));
                break;
            default:
                break;
        }
    }
}
